home *** CD-ROM | disk | FTP | other *** search
/ Utilities Professional 1-1500 / Utilities Professional 1-1500 (1994)(WPD)[!].iso / 07511000 / var0784.dms / var0784.adf / McC / mccnext.txed < prev    next >
Text File  |  1978-01-24  |  2KB  |  45 lines

  1. /************************************************************************/
  2. /*                                                                      */
  3. /*   This macro finds the next error message and moves the cursor in    */
  4. /* edit window to the corresponding line.                               */
  5. /*                                                                      */
  6. /* Version 2.0          Written:  2/20/89           By:  John McClennan */
  7. /*                                                                      */
  8. /************************************************************************/
  9.  
  10. options results
  11. options failat 30
  12.  
  13. mainaddr = getclip('McCmain')          /* get port address of edit window */
  14. erraddr = getclip('McCerr')            /* get address of error message
  15.                                           window */
  16.  
  17. address value mainaddr                 /* switch to edit port */
  18.  
  19. 'status f'                             /* get filename */
  20. filename = result
  21.  
  22. address value erraddr                  /* switch to error message port */
  23.  
  24. no_more = 0
  25. do until ((fname = filename) | (no_more = 1))
  26.    'down'
  27.    'find Error'                        /* find error description line */
  28.    if rc = 1 then do
  29.       no_more = 1                      /* at end of file */
  30.       'bottom'
  31.    end
  32.    else do
  33.       'options results'
  34.       'status l'                       /* get current line */
  35.       inline = result
  36.       parse value inline with fname linenum .   /* parse the line */
  37.    end
  38. end
  39.  
  40. address value mainaddr
  41.  
  42. 'jump' linenum '0'                     /* move to line containing error */
  43.  
  44. return
  45.